@extends('layout.layout');

@section('title','用户修改');

@section('content')
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>分类添加</span>
    </div>


    <div class="mws-panel-body no-padding">
    	<form class="mws-form" action="/cate/insert" method="post" enctype="multipart/form-data">
	    	@if (count($errors) > 0)
			    <div class="mws-form-message error">
		            <ul>
		            	@foreach ($errors->all() as $error)
			                <li>{{ $error }}</li>
			            @endforeach
		                
		            </ul>
		        </div>
			@endif

    		<div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">分类名称</label>
    				<div class="mws-form-item">
    					<input type="text" class="small" value="" name="name">
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">上级分类</label>
    				<div class="mws-form-item">
    					<select name="pid" class="small">
    						<option value="0">请选择</option>}
                            @foreach($cate as $v)
    						<option value="{{$v->id}}">{{$v->name}}</option>
                            @endforeach
    					</select>
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">分类状态</label>
    				<div class="mws-form-item clearfix">
    					<ul class="mws-form-list inline">
    						<li><input type="radio" name="status" value='1'> <label>启用</label></li>
    						<li><input type="radio" name="status" value="0"> <label>禁用</label></li>
    						
    					</ul>
    				</div>
    			</div>
    			
    		</div>
    		{{csrf_field()}}
    		<div class="mws-button-row">
    			<input type="submit" value="添加" class="btn btn-danger">
    			<input type="reset" value="重置" class="btn">
    		</div>
    	</form>
    </div>    	
</div>
@endsection('content');